import { h,defineComponent,ref,computed } from '@vue/runtime-core'
import { getPage } from './page/index'

export default defineComponent({
    setup(){
        const currentPageName = ref('startPage')
        const currentPage = computed(() => {
            return getPage(currentPageName.value)
        })
        const changePage = (page) => {
            currentPageName.value = page
        }
        
        return { currentPage, changePage }
    },
    render(ctx){
        return h('Container',[
            h(ctx.currentPage,{
                onChangePage: ctx.changePage
            })])
        
    }
})